<?php
namespace Admin\Model;
use Think\Model;
class AdministratorModel extends Model {
	public $post; //提交的信息 数组

	//判断是否管理员
	public function check_admin()
	{
		$Model=M("Administrator");
		$condition['account']=$this->post['account'];
		$condition['password']=$this->post['password'];
		$condition['is_super']=1; //1为超级用户
		$condition['_logic'] = 'and';
		// 把查询条件传入查询方法
		$count=$Model->where($condition)->count();
		if($count==0){
			return false;
		}
		return true;
	}

}